# 设置jdk版本
FROM openjdk:21
# 设置我们的个人信息，大家根据需求随便写
MAINTAINER daqi <daqi_email@163.com>
# 设置时区
RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && echo "Asia/Shanghai" > /etc/timezone

#复制依赖 jar
#COPY ${OUT_DIRECTORY}/lib /lib
ADD abcshop-api.jar /abcshop/abcshop-api.jar
WORKDIR /abcshop
# 镜像启动成为容器后，对外暴露的端口
EXPOSE 8060
# Image创建容器时的初始化内存，最大内存，及启动时使用的profile. -c为清除以前启动的数据
ENTRYPOINT ["java","-jar","-Dloader.path=/abcshop/lib","/abcshop/abcshop-api.jar","-c"]